-- GENERATED SPELL FOR [Ancient Sentinel] --


function spell0_31797(pUnit, Event) --@Stomp,n/a--
pUnit:FullCastSpellOnTarget(12612,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31797', 553, 1)
end

function spell1_31797(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_31797', 577, 1)
end

function Sorts_31797(pUnit, Event)
local choix_sorts_31797 = math.random(0, 1)
if choix_sorts_31797 == 0 then
pUnit:RegisterEvent('spell0_31797', 1, 1)
end
if choix_sorts_31797 == 1 then
pUnit:RegisterEvent('spell1_31797', 1, 1)
end
end

function mob31797_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31797', math.random(1500, 3000), 1)
end

function mob31797_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31797_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31797_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31797, 1, 'mob31797_Action')
RegisterUnitEvent(31797, 2, 'mob31797_Leave')
RegisterUnitEvent(31797, 3, 'mob31797_Kill')
RegisterUnitEvent(31797, 4, 'mob31797_Die')
